﻿<Views:ViewPage
    x:Class="SecureBox.UI.ViewPage.SettingsViewPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:Controls="clr-namespace:SecureBox.Controls;assembly=SecureBox.Controls" xmlns:Views="clr-namespace:PhoneCore.Framework.Views;assembly=PhoneCore.Framework" xmlns:Command="clr-namespace:PhoneCore.Framework.Views.Command;assembly=PhoneCore.Framework" FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="480"
    DataContext="{Binding Settings, Source={StaticResource Locator}}"
    shell:SystemTray.IsVisible="False">
    <Grid x:Name="LayoutRoot">
        <StackPanel x:Name="TitlePanel" Margin="12,0,0,0" Canvas.ZIndex="2">
            <TextBlock x:Name="ApplicationTitle" Text="SECURE BOX SETTINGS" Style="{StaticResource PhoneTextNormalStyle}"/>
        </StackPanel>
        <Grid x:Name="ContentPanel"  Margin="0,0,0,0" Canvas.ZIndex="1">
            <!-- IsLocked="{Binding IsChecked, ElementName=lockPivot}"-->
            <toolkit:LockablePivot>
                <toolkit:LockablePivot.Background>
                    <ImageBrush ImageSource="/Resources/Images/LibraryBackground.jpg"/>
                </toolkit:LockablePivot.Background>
                <controls:PivotItem Margin="0,10,0,0" Header="application" HorizontalAlignment="Stretch">
                    <StackPanel Orientation="Vertical">
                        <toolkit:ListPicker SelectedItem="{Binding SelectedTraceLevel, Mode=TwoWay}" 
                                            Header="trace level" Margin="12,24,12,0">
                            <sys:String>Info</sys:String>
                            <sys:String>Warn</sys:String>
                            <sys:String>Error</sys:String>
                            <sys:String>Fatal</sys:String>
                        </toolkit:ListPicker>
                        <!--<TextBlock Text="{Binding TotalTraceRecordText}" />-->
                        <Button Content="view log">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Click">
                                    <Command:ExecuteCommandAction 
                                    Command="{Binding GoToHealth}" />
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </Button>
                    </StackPanel>
                </controls:PivotItem>
                <controls:PivotItem Margin="0,10,0,0" Header="pass gen" HorizontalAlignment="Stretch">
                    <StackPanel Orientation="Vertical" >
                        <!--TODO need to be improved-->
                        <!--<TextBlock Text="{Binding PasswordLabel, Mode=TwoWay}" Margin="12,12,0,10" />
                        <Controls:RangeSlider  Margin="12,0,12,0"
                            Minimum="0"
                            Maximum="64"
                            MinimumRangeSpan="1"
                            RangeStart="{Binding PasswordMinimum, Mode=TwoWay}" 
                            RangeEnd="{Binding PasswordMaximum, Mode=TwoWay}">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="RangeChanged">
                                    <cmd:ExecuteCommandAction Command="{Binding RangeChangedCommand}" />
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </Controls:RangeSlider>-->
                        <!--<TextBlock
                            Margin="24,12,12,12"
                            TextWrapping="Wrap"
                            Style="{StaticResource PhoneTextSmallStyle}"
                            Text="This slider helps you to set minimum and maximum length of the password. These settings will be used by password generation tool. If you have some problems with usage of this control, try to lock pivot"/>-->
                        <!--<CheckBox  x:Name="lockPivot" />-->
                        <toolkit:ListPicker Header="password characters" Margin="12,24,12,0">
                            <sys:String>alphanumeric</sys:String>
                            <sys:String>all</sys:String>
                        </toolkit:ListPicker>
                        <TextBlock
                            Margin="24,12,12,12"
                            TextWrapping="Wrap"
                            Style="{StaticResource PhoneTextSmallStyle}"
                            Text="This list defines the characters set which will be used by password generation tool"/>

                    </StackPanel>
                    </controls:PivotItem>
                <controls:PivotItem Margin="0,10,0,0" Header="synchronize" HorizontalAlignment="Stretch">

                </controls:PivotItem>
                </toolkit:LockablePivot>
        </Grid>
    </Grid>
</Views:ViewPage>
